const adSdk = {};
var interstitialAd = null;
var customJzAd = null;

let sysInfo = uni.getSystemInfoSync()
let _windowWidth = sysInfo.windowWidth
let _windowHeight = sysInfo.windowHeight

let showGridJzTime = 0

adSdk.initInterstitial = function(id){
	console.log('加载插屏广告'+id)
	if (wx.createInterstitialAd) {
		interstitialAd = uni.createInterstitialAd({
		  adUnitId: id
		});
		interstitialAd.onLoad(() => {
		  console.log('插屏广告加载中');
		});
		interstitialAd.onError((err) => {
		  console.log('加载错误', err);
		});
		interstitialAd.onClose((res) => {
		  console.log('插屏广告关闭', res);
		});
	}
};

adSdk.showInterstitial = function(){
	interstitialAd.show()
}

export default adSdk 
